import Counter from './components/Counter';
import { useDispatch } from 'react-redux';
import { addToNum } from './store/modules/counterStore';
import List from './components/List';
import { Fragment } from 'react';

const App = () => {

  const dispatch = useDispatch();

  return (
    <Fragment>
      <Counter/>

      <button className="block w-fit mx-auto mt-[50px] py-[10px] bg-orange-400 px-[20px] rounded-[8px] active:bg-orange-500 select-none cursor-pointer" onClick={() => {dispatch(addToNum(50))}}>添加到50</button>

      <List/>

    </Fragment>
  );
};

export default App;